{template:header}
<script type="text/javascript" src="{lang:thread.js}"></script>
<script type="text/javascript" src='./scripts/thread.js'></script>
<div class="separate"><!-- separate block --></div>
<div class="ttable">
	<div class='tcat'>
		<div style="float:right;">
			<a href='announcement.php{sessionurl}do=doannouncement'>{$lang['addannouncement']}</a>&nbsp;&nbsp;
			<if="$bbuserinfo['is_mod']">
			<a href='announcement.php{sessionurl}do=showall'>{$lang['allannounce']}</a>
			</if>
		</div>
		<span class="pages">{$pages}</span>
		<h1>{$lang['announcement']}</h1>
	</div>
</div>
<if="$announcement">
<foreach="$announcement AS $data">
<a id="ann{$data['announceid']}" name="ann{$data['announceid']}" accesskey="t"></a>
<div class="div_post">
	<div class="item_change">
		<div class="user_profile" onmouseover="this.className='user_profile action_area';" onmouseout="this.className='user_profile';">
			{$data['user']['avatar']}
			<em>{$data['user']['name']}</em>
			<if="$data['user']['gender']==1">
			<img src='images/<#IMAGE#>/male.gif' alt='{$lang['_male']}' />
			<elseif="$data['user']['gender']==2">
			<img src='images/<#IMAGE#>/female.gif' alt='{$lang['_female']}' />
			</if>
			<div><cite>{$data['user']['grouptitle']}</cite></div>
			<ul>
			<li>{$lang['_useposts']}: {$data['user']['posts']}</li>
			<li>{$lang['_joindate']}: {$data['user']['joindate']}</li>
			</ul>
		</div>
		<div class="post_content">
			<div class="post_info">
				<ul>
					<if="$bbuserinfo['supermod'] OR $bbuserinfo['id']==$data['userid']">
					<li><a href="announcement.php{sessionurl}do=doannouncement&amp;id={$data['announceid']}&amp;ref={$do}"><em>{$lang['editannounce']}</em></a></li>
					<li><a href="javascript:delete_post('announcement.php{sessionurl}do=deleteannouncement&amp;id={$data['announceid']}&amp;ref={$do}')"><em>{$lang['deleteannounce']}</em></a> </li>
					</if>
					<if="$data['user']['pmicon']">
					<li><a href='private.php{sessionurl}do=newpm&amp;u={$data['user']['pmicon']}'><em>{$lang['_pm']}</em></a></li>
					</if>
				</ul>
				<h3 class="anoc_title">{$data['announcetitle']}</h3>
				<cite class="time">{$data['dateline']}</cite>
			</div>
			<div class="post_text">
				{$data['pagetext']}
			</div>
			<div class="clear"><!-- clear float --></div>
		</div>
	</div>
</div>
</foreach>
<else>
<div class="div_post">
	<div class="item_change post_content">
		{$lang['noannouncement']}
	</div>
</div>
</if>
{template:footer}